#include "commands_allegro.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

const struct avgdl_allegro_list allegro_action_list[] = {

	{"object",
		RAW,
		"\tavgdl_object_init(&w->\\1);\n"
	},

	{"shape-triangle",
		RAW,
		"\tavgdl_object_shape(&w->\\1, triangle, 3);\n"
	},

	{"colour",
		RAW,
		"\tavgdl_object_color(&w->\\1, triangle_rgb);\n"
	},

	{"draw",
		NATIVE,
		(char *[]) {
			"OBJECTS_DRAW",
			"\tavgdl_object_draw(&w->\\1);\n",
		}
	},

	{"location",
		RAW,
		"\tavgdl_object_location(&w->\\1, \\2, \\3, \\4);\n",
	},

	/*
	{"draw-array",
		NATIVE,
		(char *[]) {
			"OBJECTS_DRAW",
			"\t\tfor i in range(0, \\2):\n"
			"\t\t\tself.\\1[i].draw()\n",
		}
	},
	*/

	// test for array of objects
	/*
	{"objects",
		RAW,
		"\t\tself.\\1 = list()\n"
		"\t\tfor i in range(0, \\2):\n"
		"\t\t\tself.\\1.append(Object())\n"
	},
	*/

	/*
	{"rotate",
		NATIVE,
		(char *[]) {
			"OBJECTS_UPDATE",
			"\t\tself.\\1.loc = rotate_matrix(self.\\1.loc, \\2, 0)\n",
		}
	},

	{"int",
		RAW,
		"1",
	},

	{"update",
		NATIVE,
		(char *[]) {
			"OBJECTS_UPDATE",
			"",
		}
	},
	*/

	/* Example
	{"object", 
		"\1 = new Object();\n"
		"\1.name = \2;"
	},
	*/

};

const int allegro_action_size = sizeof(allegro_action_list)
	/sizeof(struct avgdl_allegro_list);
